<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.freedesktop.UDisks2.Encrypted: UDisks Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="UDisks Reference Manual">
<link rel="up" href="ch02.html" title="D-Bus Interfaces">
<link rel="prev" href="gdbus-org.freedesktop.UDisks2.Swapspace.html" title="org.freedesktop.UDisks2.Swapspace">
<link rel="next" href="gdbus-org.freedesktop.UDisks2.Loop.html" title="org.freedesktop.UDisks2.Loop">
<meta name="generator" content="GTK-Doc V1.29 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gdbus-org.freedesktop.UDisks2.Encrypted.description" class="shortcut">Description</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#gdbus-org.freedesktop.UDisks2.Encrypted.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gdbus-org.freedesktop.UDisks2.Swapspace.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gdbus-org.freedesktop.UDisks2.Loop.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gdbus-org.freedesktop.UDisks2.Encrypted"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdbus-interface-org-freedesktop-UDisks2-Encrypted.top_of_page"></a>org.freedesktop.UDisks2.Encrypted</span></h2>
<p>org.freedesktop.UDisks2.Encrypted — Block device containing encrypted data</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Methods</h2>
<pre class="synopsis">
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-method-org-freedesktop-UDisks2-Encrypted.Unlock" title="The Unlock() method">Unlock</a>           (IN  s     passphrase,
                  IN  a{sv} options,
                  OUT o     cleartext_device);
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-method-org-freedesktop-UDisks2-Encrypted.Lock" title="The Lock() method">Lock</a>             (IN  a{sv} options);
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-method-org-freedesktop-UDisks2-Encrypted.ChangePassphrase" title="The ChangePassphrase() method">ChangePassphrase</a> (IN  s     passphrase,
                  IN  s     new_passphrase,
                  IN  a{sv} options);
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-method-org-freedesktop-UDisks2-Encrypted.Resize" title="The Resize() method">Resize</a>           (IN  t     size,
                  IN  a{sv} options);
</pre>
</div>
<div class="refsect1">
<a name="id-1.3.3.11.4"></a><h2>Properties</h2>
<pre class="synopsis">
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-property-org-freedesktop-UDisks2-Encrypted.ChildConfiguration" title='The "ChildConfiguration" property'>ChildConfiguration</a>  readable   a(sa{sv})
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-property-org-freedesktop-UDisks2-Encrypted.HintEncryptionType" title='The "HintEncryptionType" property'>HintEncryptionType</a>  readable   s
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-property-org-freedesktop-UDisks2-Encrypted.MetadataSize" title='The "MetadataSize" property'>MetadataSize</a>        readable   t
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-property-org-freedesktop-UDisks2-Encrypted.CleartextDevice" title='The "CleartextDevice" property'>CleartextDevice</a>     readable   o
</pre>
</div>
<div class="refsect1">
<a name="gdbus-interface-org-freedesktop-UDisks2-Encrypted"></a><h2>Description</h2>
<p>      This interface is used for <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-interface-org-freedesktop-UDisks2-Block.top_of_page">org.freedesktop.UDisks2.Block</a>
      devices that contain encrypted data.
</p>
</div>
<div class="refsect1">
<a name="gdbus-methods-org.freedesktop.UDisks2.Encrypted"></a><h2>Method Details</h2>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Encrypted.Unlock"></a><h3>The Unlock() method</h3>
<pre class="programlisting">
Unlock (IN  s     passphrase,
        IN  a{sv} options,
        OUT o     cleartext_device);
</pre>
<p>        Tries to unlock the encrypted device using <em class="parameter"><code>passphrase</code></em>.
</p>
<p>        If the device in question is referenced in a system-wide
        configuration file (such as the <code class="filename">/etc/crypttab</code> file),
        then name, options and passphrase (if available) is used from that
        file after requesting additional authorization.
</p>
<p>        If an empty passphrase should be used to unlock the device, it has to be
        passed using the <em class="parameter"><code>keyfile_contents</code></em> parameter. Empty string passed as
        <em class="parameter"><code>passphrase</code></em> means "Use the passphrase from the configuration file".
</p>
<p>        If the device is removed without being locked (e.g. the user
        yanking the device or pulling the media out) the cleartext
        device will be cleaned up.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>passphrase</code></em></code>:</span></p></td>
<td><p>The passphrase to use.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>Options - known options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>keyfile_contents</code></em> (of type 'ay') which is preferred over <em class="parameter"><code>passphrase</code></em> if specified.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">OUT o <em class="parameter"><code>cleartext_device</code></em></code>:</span></p></td>
<td><p>An object path to the unlocked object implementing the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-interface-org-freedesktop-UDisks2-Block.top_of_page">org.freedesktop.UDisks2.Block</a> interface.</p></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Encrypted.Lock"></a><h3>The Lock() method</h3>
<pre class="programlisting">
Lock (IN  a{sv} options);
</pre>
<p>        Locks the encrypted device.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Encrypted.ChangePassphrase"></a><h3>The ChangePassphrase() method</h3>
<pre class="programlisting">
ChangePassphrase (IN  s     passphrase,
                  IN  s     new_passphrase,
                  IN  a{sv} options);
</pre>
<p>        Changes the passphrase to <em class="parameter"><code>new_passphrase</code></em>. An existing passphrase is required.
</p>
<p>        If <em class="parameter"><code>old_keyfile_contents</code></em> or
        <em class="parameter"><code>new_keyfile_contents</code></em> are given, they take
        precedence over the corresponding passphrase parameters individually.
</p>
<p>        If the device in question is referenced in a system-wide
        configuration file (such as the
        <code class="filename">/etc/crypttab</code> file) and this
        configuration references the passphrase, it is not
        automatically updated.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>passphrase</code></em></code>:</span></p></td>
<td><p>The existing passphrase.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>new_passphrase</code></em></code>:</span></p></td>
<td><p>The new passphrase to use.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>Options - known options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>old_keyfile_contents</code></em> and <em class="parameter"><code>new_keyfile_contents</code></em> (of type 's' or 'ay').</p></td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-method-org-freedesktop-UDisks2-Encrypted.Resize"></a><h3>The Resize() method</h3>
<pre class="programlisting">
Resize (IN  t     size,
        IN  a{sv} options);
</pre>
<p>        Resizes the encrypted device.  The device must be unlocked.
        The given size is the target size for the cleartext device.
</p>
<p>        You need to specify either <em class="parameter"><code>passphrase</code></em> or <em class="parameter"><code>keyfile_contents</code></em> for LUKS 2
        devices that don't have verified key loaded in kernel keyring.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="literal">IN t <em class="parameter"><code>size</code></em></code>:</span></p></td>
<td><p>The target cleartext size in bytes, 0 for maximum.</p></td>
</tr>
<tr>
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
<td><p>Options - known options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>passphrase</code></em> (of type 's') and <em class="parameter"><code>keyfile_contents</code></em> (of type 'ay') which is preferred over <em class="parameter"><code>passphrase</code></em> if specified.</p></td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.8.0</p>
</div>
</div>
<div class="refsect1">
<a name="gdbus-properties-org.freedesktop.UDisks2.Encrypted"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="gdbus-property-org-freedesktop-UDisks2-Encrypted.ChildConfiguration"></a><h3>The "ChildConfiguration" property</h3>
<pre class="programlisting">
ChildConfiguration  readable   a(sa{sv})
</pre>
<p>Configuration items belonging to the</p>
<p>         clear text device of this encrypted block device and its
         children.  This is also valid when this block device is
         currently locked and there is no clear text device for it.
         It works via the 'track-parents' options of
         <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.AddConfigurationItem" title="The AddConfigurationItem() method">AddConfigurationItem()</a>, which
         see.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-property-org-freedesktop-UDisks2-Encrypted.HintEncryptionType"></a><h3>The "HintEncryptionType" property</h3>
<pre class="programlisting">
HintEncryptionType  readable   s
</pre>
<p>         If not blank, the type of the encryption used to encrypt this device.
</p>
<p>         This is set during successful unlocking of an encrypted device.
         It is required for encryption types which can only be determined
         by decrypting the device (for example TCRYPT), but is used for all
         encryption types for consistency reasons.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-property-org-freedesktop-UDisks2-Encrypted.MetadataSize"></a><h3>The "MetadataSize" property</h3>
<pre class="programlisting">
MetadataSize  readable   t
</pre>
<p>Size of the metadata on the encrypted device in bytes</p>
</div>
<hr>
<div class="refsect2">
<a name="gdbus-property-org-freedesktop-UDisks2-Encrypted.CleartextDevice"></a><h3>The "CleartextDevice" property</h3>
<pre class="programlisting">
CleartextDevice  readable   o
</pre>
<p>         For an unlocked device, the object path of its cleartext device.
</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.29</div>
</body>
</html>